<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
		<head>
		<title>Button click</title>
		<script type="text/javascript">
			function validateEmail() {
				var email = document.getElementById('email').value;
				var status = false;     
				var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;

				if (email.search(emailRegEx)) {
					alert("This email address is not valid!");
				}
				else {
					alert("This email address is valid.");
					status = true;
				}
			}
		</script>
	</head>
	<body>
		Email address: <input type="text" id="email"></br>
		<button onClick="validateEmail()">Validate e-mail address</button>
	</body>
</html>